#include <stdio.h>
#include"MyQueue.h"

static void MyQueuePrint(MyQueue* q)
{
	int temp = 0;
	assert(q);
	printf("InStack:");
	temp = STSize(q->ist);
	for (int i = 0; i < temp; ++i)
	{
		printf("%d->", q->ist->a[i]);
	}
	printf("\n");
	printf("OutStack:");
	temp = STSize(q->ost);
	for (int i = 0; i < temp; ++i)
	{
		printf("%d->", q->ost->a[i]);
	}
	printf("\n");
}

void testmyqueue()
{
	MyQueue* q = myQueueCreate();
	MyQueuePrint(q);
	myQueuePush(q, 1);
	myQueuePush(q, 2);
	MyQueuePrint(q);
	myQueuePop(q);
	MyQueuePrint(q);
	myQueuePush(q, 3);
	MyQueuePrint(q);
	printf("delval = %d\n", myQueuePeek(q));
	myQueueFree(q);
}

int main()
{
	testmyqueue();
	return 0;
}